<div id="message_edit_div" class="app-toolbar-content">
    <?php
    require("{$CfgPara->root}/view/tittle_back_bar.app.v.php");
    if ($InputData['msg_edit_view'] == message_m::MsgSystem)
        require("{$CfgPara->root}/view/list_sele_bar3.app.v.php");
    ?>
    <div style="height:10px"></div>
    <div id="message_edit_form" class="editor-project editor_text editor_image_list">
        <div class="am-form">
            <?php
            if (isset($InputData['msg_edit_view']) &&
                $InputData['msg_edit_view'] == message_m::MsgPrivateDialogList
            ) {
                ?>
                <div class="am-form-group" style="padding: 0 10px">
                    <label style="padding-left:10px" for="message_edit_to_username">用户名:</label>
                    <input type="text" style="border-radius: 5px" id="message_edit_to_username" placeholder="请输入接收方的用户名"
                           value="<?= $msg_reply_username ?>">
                </div>
            <?php } ?>
            <?php
            if (isset($InputData['msg_edit_view']) &&
                $InputData['msg_edit_view'] == message_m::MsgSystem
            ) {
                ?>
                <div class="am-form-group" style="padding: 0 10px">
                    <label style="padding-left:10px" for="message_edit_to_username">标题:</label>
                    <input type="text" style="border-radius: 5px" id="message_tittle" placeholder="请输入消息标题" value="">
                </div>
            <?php } ?>
            <div class="am-form-group" style="padding: 0 10px">
                <textarea rows="8" style="border-radius: 5px"
                          id="message_edit_text"
                          placeholder="请填写发送内容"><?php if (isset($edit_pre_text)) echo $edit_pre_text; ?></textarea>
            </div>
        </div>
        <div id="img_list_demo" style="padding:5px 0 0 16px;">
            <a id="editor_img_plus" onclick="img_add_trig(4)"><img src="/img/editor_plus.png"
                                                                   class="app-img-preview"></a>
        </div>
        <div id="img_edit_btn" style="height:38px;padding-right:15px;">
            <span class="am-fr" style="padding-top:3px"><span id="img_count">0</span>/<span id="img_max_count">9</span>
        </div>
    </div>

    <div class="editor-project editor_image_cut" style="display: none">
        <div style="margin-top:10px; padding:0;">
            <div id="div_need_cut" style="overflow: hidden;background-color:black; border:none">
                <img id="img_need_cut" style="position:relative; top:0; left:0; width:100%;"
                     src=""/>
            </div>
            <div style="text-align:center;margin-top:20px">
                <img src="/img/editor_cut.png" alt="">
            </div>
            <div style="display:none">
                <canvas id="img_canvas" width="1024" height="768"></canvas>
            </div>
        </div>
    </div>

    <div class="editor-project editor_image_dele" style="display: none">
        <img id="editor_image_need_dele" src="" alt="" style="width:100%">
    </div>
    <div style="display:none">
        <input id="img_new_file" type="file" onchange="img_show_change(this)"/>
        <input id="msg_type" name="msg_type" value="<?= $InputData['msg_edit_view'] ?>"/>
        <input id="msg_dialog" name="msg_dialog" value="<?= $InputData['msg_dialog'] ?>"/>
    </div>
</div>
<div id="message_edit_toolbar" class="am-btn-group" style="width:100%">
    <div style="width:100%; height:45px; border-top:1px solid; padding:10px; text-align:center; display:none"
         class="editor-btn editor_btn_image_cut app-gray-color">
        <a class="am-icon am-icon-angle-left am-icon-fw am-fl" onclick="editor_show('text', 4)"></a>
        <span id="bar_tittle">裁剪</span>
        <a class="am-icon am-icon-angle-right am-icon-fw am-fr" onclick="imgCut.Upload();"></a>
    </div>
    <a style="width:100%; height:45px;padding-top:10px;"
       class="am-btn app-main-backcolor editor-btn editor_btn_text editor_btn_image_list" role="button"
       onclick="message_release(<?= $InputData['msg_edit_view'] ?>)">
        <span class="am-text-sm">发布</span>
    </a>
</div>
<script type="text/javascript">
    if (imgCut == null) {
        imgCut = new CImgCut();
    }
    img_show_upload_ini(4);
    toolbar_ini("message_edit_div", "message_edit_toolbar");
</script>
